﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using System.ServiceProcess;
using System.Text;
using log4net.Config;

namespace AccessBasedDesktop.Service
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        static void Main()
        {
            string configFileName = Path.Combine(Path.GetDirectoryName(Assembly.GetEntryAssembly().Location),
                @"log4net.config.xml");
            XmlConfigurator.Configure(new FileInfo(configFileName));

            ServiceBase[] ServicesToRun;
            ServicesToRun = new ServiceBase[] 
			{ 
				new AccessBasedDesktopService() 
			};
            ServiceBase.Run(ServicesToRun);
        }
    }
}
